package _14综合继承案例_超级玛丽游戏;

public class Mushroom extends Role{
    private int score;

    //碰撞crash
    public void crash(){
        System.out.println(super.getName()+"碰撞得分"+score);
    }


    public Mushroom() {
    }

    public Mushroom(String name, String imageName, int score) {
        super(name, imageName);
        this.score = score;
    }

    public int getScore() {
        return score;
    }

    public void setScore(int score) {
        this.score = score;
    }
}
